Method for an electronic device to detect the presence of a battery charger

ABSTRACT

A battery (104) is connected to a host device (106), the host device is an electrical or electronic device, such as a cellular telephone. The battery is rechargeable, and contains a memory (110) connected to a data line (116). The battery is connected to a battery charger (102) while also connected to the host device. The battery charger detects the battery (306), reads the battery information (308) from the battery memory. The data line is common to the battery charger, battery, and host device. The charger indicates its presence to the host device by changing the voltage level on the data line (310) from a normal first level, such as a logic level of one, to a second level, such as a logic level of zero, and holds the data line at the second level. The host detects the presence of the battery charger (312) after the data line has been held at the second level for a sufficient period of time, and then may take the desired actions (314).

TECHNICAL FIELD

This invention relates in general to battery powered electronic andelectrical devices, and particularly such devices using a rechargeablebattery that can be recharged while operating the electrical orelectronic device.

BACKGROUND OF THE INVENTION

A great many electronic devices are powered by rechargeable batteries.Perhaps the best example of which is a typical cellular telephone.Because of the power consumption of a cellular telephone, rechargeablebatteries are a much lower cost means of powering the telephone thanusing primary, or nonrechargeable batteries. Accordingly, a great dealof work has been done in the battery and battery charger arts.Presently, a number of manufacturers have designed and sell rechargeablebattery packs, or simply batteries, that include electronic digitalmemory devices. The information stored in these memory devices includesbattery parameters to allow the charger to select an optimal chargeregime for the particular type of battery.

At the same time, people have become more dependent on devices such ascellular telephones, and often leave them on as much as possible. Sincethe battery must periodically be recharged, manufacturers have designedbattery chargers that will accept the battery while it is connected orattached to the host device. In this way, the user can leave the deviceon so as not to miss any incoming phone calls.

Once the battery and the attached device are placed into the batterycharger, the battery charger can commence charging the battery accordingto the information read from the battery memory. At the same time, it isdesirable to take certain actions in the host device, such as turningoff the display of the battery fuel gauge, and turning on keypadbacklights, for example. Since the battery is being charged, there is noneed to worry about draining excess current from the battery, as whenoperating the device away from the battery charger. However, the hostdevice needs to be able to detect the presence of the battery chargerbefore any such actions can be taken. Therefore, there is a need for amethod for an electronic device to detect the presence of a batterycharger, so that the electronic device can take actions such as turningoff display segments. Furthermore, there is a need for the device to beable to detect the removal of the battery charger, so that high currentdrain activities may be minimized so as to prolong the operation timeafforded by the battery.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of battery powered system including a batterycharger, battery, and a host device, in accordance with one embodimentof the invention;

FIG. 2 is a graph of voltage on a data line vs. time in accordance withone embodiment of the invention; and

FIG. 3 is a flow chart diagram of a method of detecting the presence ofa battery charger in accordance with one embodiment of the invention.

DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT

While the specification concludes with claims defining the features ofthe invention that are regarded as novel, it is believed that theinvention will be better understood from a consideration of thefollowing description in conjunction with the drawing figures, in whichlike reference numerals are carried forward.

Referring now to FIG. 1, there is shown therein a block diagram ofbattery powered system 100 including a battery charger 102, battery 104,and a host device 106, in accordance with one embodiment of theinvention. The host device is an electronic device, such as, forexample, a cellular telephone, and includes a microprocessor 108. Thebattery comprises at least one rechargeable battery cell, a memorydevice 110, and a thermistor 112. The thermistor is used to indicate thebattery temperature to the charger over a thermistor line 113, as isconventional. The battery charger comprises a microprocessor 114, andcircuitry for providing charging power to the battery as isconventional. Furthermore, the charger has a pocket designed to acceptand hold a battery, or a host device with a battery attached to the hostdevice. The battery charger and host device have electrical contacts andmating features for connecting with the battery, which has correspondingelectrical contacts and mating features, as is conventional. The batterymay be connected to the host device, the battery charger, or both at anygiven time. Typically, however, the battery remains attached to the hostdevice for convenience, and when the user desires to recharge thebattery, both the host device and the battery are placed in the pocketof the battery charger. The memory device 110 is accessible via a dataline 116 by the host device and the battery charger. A ground line 118is common to all three.

In practicing the invention, the battery is connected to the electronicdevice prior to inserting them, together, into the charger. Onceinserted into the charger, the battery becomes connected to the batterycharger by electrical contacts, as is well known. The charger willdetect the presence of the battery by any of the well known methods,such as by detecting a voltage of the battery, or, as in the preferredembodiment, detecting a voltage level change on the thermistor line. Thevoltage level change occurs, for example, when the thermistor becomesconnected to the charger, and forms a voltage divider with a thermistorpull up resistor 120. Once the battery has been detected, the batterycharger must obtain the battery information stored in the memory deviceof the battery, so the memory device is read over the data line by thecharger. After performing the reading, the charger pulls the data linelow. Normally the data line is held in a first level, such as a highlevel by a data pull up resistor 122 in the host device, and a similarpull up resistor 124 in the charger. Thus, by high level, or simplyhigh, it is meant a voltage level considered to be a logic level valueof one, and by low it is meant a voltage level considered to be a logiclevel of zero. The battery charger then holds the data line at a secondlevel, for example, by pulling the data line low, such as with atransistor 126. The electronic device 106 detects the presence of thebattery charger by observing the data line. If the data line is detectedat the second level, the host device begins a timer. If the data lineremains low for a preselected period of time, then the host deviceinfers that the charger is present, and takes appropriate actions, suchas shutting off a battery indicator. The preselected period of time islong enough so that, under normal operation, no other event could causethe data line to be low for such a period of time. A time of about onesecond is typically sufficient.

Referring now to FIG. 2, there is shown a graph 200 of voltage on thedata line vs. time in accordance with one embodiment of the invention.At time 202, the battery is connected to the host device. At time 204,the battery is further connected to the battery charger. Between times202 and 204, the voltage on the data line is pulled up only by the pullup resistor in the host device. At time 204, because of the pull upresistor in the battery charger, the voltage on the data line risesslightly. In either case, the voltage on the data line is sufficientlyhigh to indicate a logic level of one. Subsequent to time 204, and priorto time 206, the battery charger detects the battery. To verify that abattery is present, a test may be performed, such as providing currentto the battery to see if the current will pass through the battery. Attime 206 the battery charger has determined that a battery has beenconnected to it, and begins reading the memory device, thus the dataline alternates between the first level and the second level, dependingon the value of the data being read from the memory. The preferredcommunication scheme is a serial asynchronous scheme. Typically thebattery charger will provide a code on the data line which is receivedby the memory device, and the memory device will respond by writing thecontents of the memory on the data line, which is read by the batterycharger. At time 208 the charger has finished reading the memory.Shortly thereafter, and beginning at time 210, the battery charger pullsdown and hold the data line low. The host device, upon observing thedata line being low, begins a timer. At time 212 the timer has maturedwithout the data line changing from a low level, and the host devicedetermines that the charger is present, and connected to the battery.Some time thereafter, at time 214, the battery and host device areremoved from the charger. Accordingly, since the loading of the dataline by the charger is no longer possible, the data line returns to itsoriginal level, and the host device detects the change back to the firstlevel, and reactivates the battery related functions.

Referring now to FIG. 3, there is shown a flow chart diagram 300 of amethod for detecting the presence of a battery charger in accordancewith one embodiment of the invention. The process begins by connectingthe battery to a host electronic device, as in step 302. Next, thebattery, while connected to the host, is further connected to thebattery charger, in step 304. The battery charger then detects theconnection to the battery, in step 306, and commences reading the memoryin the battery over that data line, in step 308. The battery chargerreads battery parameters from the memory in the battery to optimize acharge regime for the battery. Upon successfully reading the batterymemory, the charge pulls the data line low, as in step 310. The chargerholds the data line low, and since the data line is normally high, ifthe data line is held low long enough, the host device will detect theholding of the data line, as in step 312. Once the host device hasdetected the charger, it can take the desired actions, such as turningoff the display of a battery fuel gauge.

While the preferred embodiments of the invention have been illustratedand described, it will be clear that the invention is not so limited.Numerous modifications, changes, variations, substitutions andequivalents will occur to those skilled in the art without departingfrom the spirit and scope of the present invention as defined by theappended claims.

What is claimed is:
 1. A method, for an electronic device powered by abattery, for detecting a presence of a battery charger, the batteryhaving a memory device disposed therein coupled to a data line, avoltage level on the data line having a first level and a second level,the voltage level normally being at the first level, the methodcomprising the steps of:connecting the battery to the electronic device,including connecting the data line of the battery to the electronicdevice; connecting the battery to the battery charger, performed afterthe step of connecting, while the electronic device is still connectedto the battery; detecting the battery by the charger; reading the memorydevice over the data line, performed by the charger after the step ofconnecting the battery to the battery charger; holding the voltage levelof the data line at the second level; and detecting the voltage level ofthe data line being at the second level by the electronic device.
 2. Amethod for detecting the presence of a battery charger as defined inclaim 1, wherein the step of detecting the battery is performed bydetecting a thermistor voltage level change on a thermistor line.
 3. Amethod for detecting the presence of a battery charger as defined inclaim 1, wherein the step of reading the memory device comprises readingbattery information from the memory device.
 4. A method for detectingthe presence of a battery charger as defined in claim 1, wherein thestep of holding the voltage level of the data line at the second stateis performed by holding the voltage level of the data line at a logicalzero level.
 5. A method for detecting the presence of a battery chargeras defined in claim 1, wherein the step of detecting the voltage levelis performed by observing the voltage level of the data line being inthe second state for a preselected period of time.
 6. A method for anelectronic device connected to a battery to detect a presence of abattery charger, the method comprising:connecting the battery to thebattery charger; detecting a voltage level change on a thermistor lineof the battery charger; applying a charge current to the battery,performed by the battery charger after performing the step of detecting;reading a memory device disposed in the battery over a data line,performed by the battery charger after performing the step of detecting;holding a voltage level of the data line at a logic level of zero; anddetecting the voltage level being at the logic level of zero, performedby the electronic device.
 7. A method as defined in claim 6, wherein thestep of reading comprises reading battery information from the memorydevice.
 8. A method as defined in claim 6, wherein the step of detectingthe voltage level being a the logical level zero level comprisesdetecting the logic level of zero for a preselected period of time.
 9. Amethod for a host device having a battery connected thereto to detect apresence of a battery charger, the battery having a memory devicedisposed therein connected to a data line, the electrical deviceconnected to the data line, the data line having a first level and asecond level, the method comprising the steps of:detecting the battery,by the battery charger; reading the memory device, by the batterycharger, over the data line; loading the data line so that the data linechanges from the first level to the second level; holding the data lineat the second level, by the battery charger; and detecting the holdingof the data line at the second level, by the host device.
 10. The methodof claim 9, wherein the step of detecting the battery comprisesdetecting a voltage change on a thermistor line.
 11. The method of claim9, wherein the step of reading the memory device comprises readingbattery parameters stored in the memory device.
 12. The method of claim9, wherein the step of loading the data line comprises changing the dataline from a logic level of one to a logic level of zero.
 13. The methodof claim 9, wherein the step of detecting the holding comprisesdetecting that the holding has occurred for at least a preselectedperiod of time.